package org.csu.onlineedubackend.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ChatMessage {
    // 消息ID
    private Long id;
    
    // 会话ID
    private Long conversationId;
    
    // 消息类型: PRIVATE 私聊, GROUP 群聊, GROUP_DISBANDED 群聊解散
    private String type;
    
    // 消息格式类型：TEXT, AUDIO, IMAGE等
    private String messageType;
    
    // 发送者ID
    private Integer senderId;
    
    // 发送者名称
    private String senderName;
    
    // 接收者ID (私聊时使用)
    private Integer receiverId;
    
    // 消息内容
    private String content;
    
    // 语音消息时长（秒）
    private Integer duration;
    
    // 发送时间
    private Date createdAt;
    
    // 是否已读
    private boolean read;
    
    // 消息状态 (SENT, DELIVERED, READ)
    private String status;

    // 群聊相关字段
    private Long groupId;
    private String groupName;
    private String ownerName;
    private Boolean isOwner;
} 